package com.usian.controller;

import com.usian.api.admin.LoginControllerApi;
import com.usian.model.admin.dtos.AdUserDto;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.service.AdUserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/login")
@RestController
public class AdUserController implements LoginControllerApi {

    @Autowired
    private AdUserService adUserService;
    @Override
    @PostMapping("/in")
    @ApiOperation("登录")
    public ResponseResult login(@RequestBody  AdUserDto dto) {
        return adUserService.login(dto);
    }
}
